﻿<%@ Page Language="C#" MasterPageFile="~/Manage/MainPage.master"  AutoEventWireup="true" CodeFile="BrandsManage.aspx.cs" Inherits="Manage_BrandsManage" %>
<%@ Import Namespace="Shopping.Common" %>
<%@ Import Namespace="Shopping.Model" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Content" Runat="Server">
<script type="text/javascript" src="/FckEditor/fckeditor.js"></script> 
<script type="text/javascript" src="/JsBase/swfupload/swfupload.js"></script> 
<script type="text/javascript" src="/JsBase/swfupload/SwfUploadHelper.js"></script> 
<script type="text/javascript" src="/Manage/Js/BrandsManage.js"></script>
<script type="text/javascript">
    ModelOfBrand = <%= JSONHelper.ObjectToJson<BrandInfo>(new BrandInfo()) %>;
    CheckOptionOfCategories = '<%=CheckOptionOfCategories %>';
    SessionID = '<%=Session.SessionID %>';
    ModelOfIDNameObj= <%= new IDNameObj().ToJsonString() %>;
</script>

<table width="99%" border="0" cellspacing="0" cellpadding="0" class="table" align="center">
  <tr>
    <td align="center"><img src="/Manage/Images/sousuo.gif" />品牌名称：
      <input name="txtKeyWords" type="text" id="txtKeyWords" size="25"  value="<%=KeyWords %>" class="border6"/>
      &nbsp;&nbsp;状态：
      <select name="ddlStatusOfSearch" id="ddlStatusOfSearch">
        <option value="">--全部--</option>
        <option value="正用" <%=status == Status.正用.ToString()?"Selected":"" %>>正用</option>
        <option value="停用" <%=status == Status.停用.ToString()?"Selected":"" %>>停用</option> 
      </select>
      <input name="btnSearch" type="button" id="btnSearch" value="执行搜索" class="btn2"  onclick="GoToSearch();"/>
      &nbsp;&nbsp;&nbsp;
       [ <a href="BrandsManage.aspx" class="red bold">查看全部</a> ]
      </td>
  </tr>
</table>
<br />

<table width="99%" border="0" cellspacing="0" cellpadding="0" class="table" align="center"  >
  <tr class="TableHeadRow">
    <td width="60" align="center">编号</td>
    <td align="left">品牌名称</td>
    <td align="left">品牌公司</td>
    <td width="120" align="center">是否首页推荐</td>
    <td width="60" align="center">排序值</td>
    <td width="60" align="center">状态</td>
    <td width="150" align="center">最后调整日期</td>
    <td width="150" align="center">创建日期</td>
    <td width="150" align="center">管理 [<a href="javascript:Add();" class="red">+添加品牌</a>] </td>
  </tr>

  <%
      if (listOfBrands != null)
      {
          for (int i = 0; i < listOfBrands.Count; ++i)
          {
              BrandInfo b = listOfBrands[i];     
  %>
  <tr onmouseover="this.style.backgroundColor='#F2F2F2';" onmouseout="this.style.backgroundColor='#FFFFFF';" >
    <td align="center"><%=(p.CurPage-1)*p.PageSize +i+1 %>.</td> 
    <td align="left"><a href="javascript:void(0);" onclick="Edit(<%=b.Brand.BrandID %>);"><%=b.Brand.BrandName %></a> [<a href="<%=b.Brand.BrandUrl %>" target="_blank"  class="green">访问品牌</a>] [共<span class="green bold"><%=b.CategoryCounts %></span>类产品 <span class="green bold"><%=b.GoodsCounts %></span>个商品]</td>
    <td align="left"><%=b.Brand.BrandCompanyName %></td>
    <td align="center" class="green bold"><%=b.Brand.IsIndexCommend?"首页推荐":"" %></td>
    <td align="center" class="green bold"><%=b.Brand.OrderValue %></td>
    <td align="center"><%=b.Brand.Status %></td>
    <td align="center"><%=b.Brand.LastModifyDate.ToString("yyyy-MM-dd HH:mm:ss") %></td>
    <td align="center"><%=b.Brand.CreateDate.ToString("yyyy-MM-dd HH:mm:ss") %></td>
    <td align="center">[ <a href="javascript:void(0);" onclick="Edit(<%=b.Brand.BrandID %>);">编辑</a> ] [ <a href="javascript:void(0);" onclick="Delete(<%=b.Brand.BrandID %>);" class="red">删除</a> ]     </td>
  </tr>
  <% } %>
 <tr>
    <td colspan="9" align="center" > <span class="page" >
       <%=Utility.GetPageLine(Utility.GetWebPageUrlNoCurPage(), p.CurPage, p.PageSize,10, p.TotalCount)%>    
        </span></td>
    </tr>
 <% }
      else
      { %>   
  <tr>
    <td colspan="9" align="center" class="red">[ 未找到任何品牌信息！]</td>
    </tr>
    <%} %>
</table>

</asp:Content>
